import { http } from "@/utils/http";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};
// 字典
export const queryChildByTypeCodeAndItemValue = (data?: object) => {
  return http.request("post", `/account/api/v1/publish/dictItem/queryChildByTypeCodeAndItemValue`, {
    data
  });
};

//报表类型查询
export const queryReportType = (params?: object) => {
  return http.request("get", `/operation/api/v1/report/list/reportType`, {
    params
  });
};

//报表记录新增
export const addReportRecord = (data?: object) => {
  return http.request("post", `/operation/api/v1/report/record/add`, {
    data
  });
};

//报表记录删除
export const deleteReportRecord = (data?: object) => {
  return http.request("post", `/operation/api/v1/report/record/delete`, {
    data
  });
};

//报表记录分页查询
export const queryReportRecord = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/report/record/page`, {
    data
  });
};

//报表记录更新
export const updateReportRecord = (data?: object) => {
  return http.request("post", `/operation/api/v1/report/record/update`, {
    data
  });
};
